import request from '@/utils/request'
import {SysOperLogDomain} from '@/type.d/monitor/operLog';

// 查询操作日志记录列表
export function listOperLog(query: SysOperLogDomain) {
  return request('/monitor/operLog/list',{
    method: 'get',
    params: query
  })
}

// 查询操作日志记录详细
export function getOperLog(operId: string) {
  return request('/monitor/operLog/' + operId,{
    method: 'get'
  })
}

// 新增操作日志记录
export function addOperLog(data: SysOperLogDomain) {
  return request('/monitor/operLog',{
    method: 'post',
    data: data
  })
}

// 修改操作日志记录
export function updateOperLog(data: SysOperLogDomain) {
  return request('/monitor/operLog',{
    method: 'put',
    data: data
  })
}

// 删除操作日志记录
export function delOperLog(operId: string) {
  return request('/monitor/operLog/' + operId,{
    method: 'delete'
  })
}

// 清空操作日志
export function cleanOperlog() {
  return request({
    url: '/monitor/operLog/clean',
    method: 'delete'
  })
}
